package org.eda.actividad4;
public class Persona implements Comparable<Persona> {
	private int dni;
	public Persona(int pDni) {
		dni = pDni;
	}
  
	public int compareTo(Persona p) {
		if (p.dni == dni) return 0;
		else if (p.dni > dni) return -1;
		else return 1;
	}
	
	public String toString() {
		return dni + " ";
	}
}
